<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css" crossorigin="anonymous">
    <title>修改Goods</title>
</head>
<body>
<div class="container">
    <form action="/Goods/edit" method="post" class="was-validated">
<!--        隐藏id字段，但不能省略，否则导致无法更新-->
        <input type="hidden" name="id" id="id" th:value="${oldGoods.id}">
        <div class="form-group">
            <label for="name">Goods Name:</label>
            <input class="form-control" type="text" id="name" name="name" placeholder="请输入Goods Name" required th:value="${oldGoods.name}">
            <div class="valid-feedback">验证成功</div>
            <div class="invalid-feedback">请输入Goods Name!</div>
        </div>
        <div class="form-group">
            <label for="price">Goods Price:</label>
            <input class="form-control" type="text" id="price" name="price" placeholder="请输入Goods Price" required th:value="${oldGoods.price}">
            <div class="valid-feedback">验证成功</div>
            <div class="invalid-feedback">请输入Goods Price!</div>
        </div>
        <div class="form-group">
            <label for="description">Goods description:</label>
            <input class="form-control" type="text" id="description" name="description" placeholder="请输入Goods description" required th:value="${oldGoods.description}">
            <div class="valid-feedback">验证成功</div>
            <div class="invalid-feedback">请输入Goods description!</div>
        </div>

        <button type="submit" class="btn btn-primary">确认修改Goods</button>
    </form>
</div>
</body>
</html>